﻿
// AriesDoc.h : CAriesDoc 类的接口
//
#include <vector>
using namespace std;


typedef struct {
	int Year;
	float Noplat;
	float AssetsDepreciationReserves;   //资产减值准备
	float Depreciation;                 //固定资产折旧、油气资产折耗、生产性物资折旧
	float IntangibleAssetAmortization;  //无形资产摊销
	float DeferredExpenseAmortiztion;	//长期待摊费用摊销
	float DeferredExpenseDecreased;		//待摊费用的减少
	float AccruedExpenseAdded;			//预提费用的增加
	float FixedAssetScrapLoss;			//固定资产报废损失
	float DeltaOperateCost;				//营运资本变化
	float InventoryDecrease;			//存货的减少
	float OperateReceivableDecrease;	//经营性应收项目的减少
    float OperatePayableIncrease;		//经营性应付项目的增加
	float CapitalPaid;					//资本支出
	float FCFvalue;                     //FCF
	} fcf_t;


#pragma once
class CLeftView;
class CRightView;

class CAriesDoc : public CDocument
{
protected: // 仅从序列化创建
	CAriesDoc();
	DECLARE_DYNCREATE(CAriesDoc)

// 特性
public:

// 操作
public:
	CLeftView  *pLeftView;
	CRightView *pRightView;

// 重写
public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	
#ifdef SHARED_HANDLERS
	virtual void InitializeSearchContent();
	virtual void OnDrawThumbnail(CDC& dc, LPRECT lprcBounds);
#endif // SHARED_HANDLERS

// 实现
public:
	virtual ~CAriesDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// 生成的消息映射函数
protected:
	DECLARE_MESSAGE_MAP()

#ifdef SHARED_HANDLERS
	// 用于为搜索处理程序设置搜索内容的 Helper 函数
	void SetSearchContent(const CString& value);
#endif // SHARED_HANDLERS
public:
	CString m_Code;
	CString m_Year;
	CString m_Nyear;	
	vector<vector <CString> > m_BalanceSheet;
	vector<vector <CString> > m_CashFlow;
	vector<vector <CString> > m_Profit;
	vector<fcf_t> m_Fcf;
	void GetDbData(void);	
	// 自由现金流计算
	void FA_fcf(void);
};

